home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Disks.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  3.6 KB  |  121 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Disks.a
  3. ;
  4. ;    Contains:    Disk Driver Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1985-1991,1993, 1995-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__DISKS__') = 'UNDEFINED' THEN
  19. __DISKS__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  25.     include 'OSUtils.a'
  26.     ENDIF
  27.  
  28.  
  29. sony                            EQU        0
  30. hard20                            EQU        1
  31. ;  Disk Driver Status csCodes 
  32.  
  33. kReturnFormatList                EQU        6                    ; .Sony 
  34. kDriveStatus                    EQU        8
  35. kMFMStatus                        EQU        10
  36. ;  Disk Driver Control csCodes 
  37.  
  38. kVerify                            EQU        5
  39. kFormat                            EQU        6
  40. kEject                            EQU        7
  41. kSetTagBuffer                    EQU        8                    ; .Sony 
  42. kTrackCache                        EQU        9                    ; .Sony 
  43. kDriveIcon                        EQU        21
  44. kMediaIcon                        EQU        22
  45. kDriveInfo                        EQU        23
  46. kRawTrack                        EQU        18244                ; .Sony: “diagnostic” raw track dump 
  47. ;    Note:
  48. ;
  49. ;    qLink is usually the first field in queues, but back in the MacPlus
  50. ;    days, the DrvSts record needed to be expanded.  In order to do this without
  51. ;    breaking disk drivers that already added stuff to the end, the fields
  52. ;    where added to the beginning.  This was originally done in assembly language
  53. ;    and the record was defined to start at a negative offset, so that the qLink
  54. ;    field would end up at offset zero.  When the C and pascal interfaces where
  55. ;    made, they could not support negative record offsets, so qLink was no longer
  56. ;    the first field.  Universal Interfaces are auto generated and don't support
  57. ;    negative offsets for any language, so DrvSts in Disks.a has qLinks at a
  58. ;    none zero offset.  Assembly code which switches to Universal Interfaces will
  59. ;    need to compensate for that.
  60. ;
  61. ;
  62.  
  63.  
  64. DrvSts                    RECORD 0
  65. track                     ds.w    1                ; offset: $0 (0)        ;  current track 
  66. writeProt                 ds.b    1                ; offset: $2 (2)        ;  bit 7 = 1 if volume is locked 
  67. diskInPlace                 ds.b    1                ; offset: $3 (3)        ;  disk in drive 
  68. installed                 ds.b    1                ; offset: $4 (4)        ;  drive installed 
  69. sides                     ds.b    1                ; offset: $5 (5)        ;  -1 for 2-sided, 0 for 1-sided 
  70. qLink                     ds.l    1                ; offset: $6 (6)        ;  next queue entry 
  71. qType                     ds.w    1                ; offset: $A (10)        ;  1 for HD20 
  72. dQDrive                     ds.w    1                ; offset: $C (12)        ;  drive number 
  73. dQRefNum                 ds.w    1                ; offset: $E (14)        ;  driver reference number 
  74. dQFSID                     ds.w    1                ; offset: $10 (16)        ;  file system ID 
  75. twoSideFmt                 ds.b    1                ; offset: $12 (18)        ;  after 1st rd/wrt: 0=1 side, -1=2 side 
  76. needsFlush                 ds.b    1                ; offset: $13 (19)        ;  -1 for MacPlus drive 
  77. diskErrs                 ds.w    1                ; offset: $14 (20)        ;  soft error count 
  78.                          ORG 18
  79. driveSize                 ds.w    1                ; offset: $12 (18)
  80. driveS1                     ds.w    1                ; offset: $14 (20)
  81. driveType                 ds.w    1                ; offset: $16 (22)
  82. driveManf                 ds.w    1                ; offset: $18 (24)
  83. driveChar                 ds.w    1                ; offset: $1A (26)
  84. driveMisc                 ds.b    1                ; offset: $1C (28)
  85.                          ORG 30
  86. sizeof                     EQU *                    ; size:   $1E (30)
  87.                         ENDR
  88. DrvSts2                    RECORD 0
  89. f                         ds        DrvSts
  90. sizeof                     EQU *                    ; size:   $1E (30)
  91.                         ENDR
  92.  
  93.  
  94.  
  95. kdqManualEjectBit                EQU        5
  96. ;
  97. ; pascal OSErr DiskEject(short drvNum)
  98. ;
  99.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  100.         IMPORT_CFM_FUNCTION DiskEject
  101.     ENDIF
  102.  
  103. ;
  104. ; pascal OSErr SetTagBuffer(void *buffPtr)
  105. ;
  106.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  107.         IMPORT_CFM_FUNCTION SetTagBuffer
  108.     ENDIF
  109.  
  110. ;
  111. ; pascal OSErr DriveStatus(short drvNum, DrvSts *status)
  112. ;
  113.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  114.         IMPORT_CFM_FUNCTION DriveStatus
  115.     ENDIF
  116.  
  117.  
  118.     ENDIF ; __DISKS__ 
  119.  
  120.